package com.mxpio.erp.common.quality.entity;

import com.mxpio.erp.common.inventory.entity.Warehouse;
import com.mxpio.erp.common.jpa.model.Order;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * @Author : 吴盼盼
 * @Datetime : 2022/12/10 10:36
 * @Desc :  库存检验申请 主表
 * @Modor :  Modifytime:
 * @modDesc :
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_QUALITY_IIA")
@Schema(description="库存检验申请")
public class InventoryInspectApply extends Order {

    private static final long serialVersionUID = 1L;

    @Column(name = "WH_CODE_")
    @Schema(description = "仓库代码")
    @Dict(dicCode = "whCode" ,dicEntity = Warehouse.class, dicText = "whName")
    private String whCode;

    @Column(name = "MEMO_")
    @Schema(description = "备注")
    private String memo;

    @Transient
    @Schema(description = "库存检验申请明细")
    private List<InventoryInspectApplyLine> applyLines;

    @Override
    public String initTypeCode() {
        return "IIA1";
    }


    /*@Column(name = "AUDIT_OPINION_")
    @Schema(description = "审核意见")
    private String auditOpinion;*/
}
